<!DOCTYPE HTML>
<html>
<head>
    <meta charset="utf-8">
    <meta name="renderer" content="webkit|ie-comp|ie-stand">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
    <meta http-equiv="Cache-Control" content="no-siteapp" />
    <link rel="stylesheet" type="text/css" href="__CSS__/main.css" />
    <link rel="stylesheet" type="text/css" href="__CSS__/common.css" />
    <link rel="stylesheet" type="text/css" href="__CSS__/bootstrap.min.css" />
    <script type="text/javascript" src="__EXTEND__/lib/jquery/1.9.1/jquery.min.js"></script>
    <script type="text/javascript" src="__EXTEND__/js/bootstrap.min.js"></script>
    <script type="text/javascript" src="__EXTEND__/lib/layer/2.4/layer.js"></script>
    <![endif]-->
    <title>审核主管审核</title>
</head>
<body>
<div class="contant">
<div class="row">
        <div role="tabpanel" class="tab-pane box" id="ggg">
                        
                        <div style="padding-top: 30px;margin-left: 35px;">
                            <div class="col-md-6">
                                <label>还款能力分析</label>
                                <textarea class="form-control" rows="5" cols="60">{$info.ability}</textarea>
                            </div>
                            <div class="col-md-6">
                                <label>还款意愿分析</label>
                                <textarea class="form-control" rows="5" cols="60">{$info.desire}</textarea>
                            </div>
                        </div>
                        <table style="width: 80%;margin-left: 50px;" class="table table-hover table-bordered">
                            <!--<h2></h2>-->
                            <div  style='margin-left: 50px;'>
                                <th>岗位职员</th>
                                <th>审核结果</th>
                                <th>审核意见</th>
                                <th>备注</th>
                                <th>审核人</th>
                                <th>审核时间</th>
                                <volist name='check_log' id='log'>
                                    <tr>
                                        <td>
                                            <switch name='log.check_status'>
                                                <case value='1'>渠道内勤审核</case>
                                                <case value='2'>区域经理审核</case>
                                                <case value='3'>审核助理审核</case>
                                                <case value='4'>审核专员审核</case>
                                                <case value='5'>审核主管审核</case>
                                                <case value='6'>审核经理审核</case>
                                            </switch>
                                        </td>
                                        <td>
                                            <switch name='log.status'>
                                                <case value='1'>通过</case>
                                                <case value='11'>待定</case>
                                                <case value='12'>退回</case>
                                            </switch>
                                        </td>
                                        <td>
                                            {$log.opinion}
                                        </td>

                                        <td>
                                            {$log.note}
                                        </td>

                                        <td>
                                            {$log.admin_name}
                                        </td>

                                        <td>
                                            {$log.add_time|date='Y-m-d H:i:s',###}
                                        </td>
                                    </tr>
                                </volist>
                            </div>
                        </table>

                          <h2>审核主管审核</h2>
                          <form action="{:U('Check/add_CheckInfo')}" method='post'>
                           <div class="list-block" style='margin-left: 3%;'>
                                    <div class="row">
                                        <div class="item col-33 ">
                                            <label>审核结果:</label>
                                            <select class="form-control" name="Cstatus" id="user_select">
                                                <option value="1">通过</option>
                                                <option value="11">待定</option>
                                                <option value="12">驳回</option>
                                                <option value="0">拒贷</option>
                                            </select>
                                        </div>
                                    </div>
                                    <!--审核退回模块-->
                                    <div id='refuse' style="display: none">
                                       
                                        <div class="row">
                                            <label>理由类型:</label>
                                            <input type='checkbox' id='reType' name='reType[]' value='骗贷' ><span for="reType">骗贷</span>
                                            <input type='checkbox' id='reType' name='reType[]' value='代购' ><span for="reType">代购</span>
                                            <input type='checkbox' id='reType' name='reType[]' value='套现' ><span for="reType">套现</span>
                                            <input type='checkbox' id='reType' name='reType[]' value='人车不匹配' ><span for="reType">人车不匹配</span>
                                            <input type='checkbox' id='reType' name='reType[]' value='客户不做' ><span for="reType">客户不做</span>
                                            <input type='checkbox' id='reType' name='reType[]' value='其他' ><span for="reType">其他</span>
                                        </div>
                                    </div>
                                    <!--审核退回模块end-->
                                    <!--审核通过模块-->
                                    <div id='check_detail'>
                                        <div class="row">
                                            <label>审核意见:</label>
                                            <textarea name="opinion" id="" style="width:400px;" cols="60" rows="5"></textarea>
                                        </div>
                                        <div class="row ">
                                            <label>备注:</label>
                                            <input type="text" style="width:400px;" class='form-control' name="note">
                                        </div>
                                    </div>
                                    <div class="row">
                                        <label></label>
                                        <input type="hidden" name="user_id" value="{$info.id}">
                                        <input type="hidden" name="check_status" value="5">
                                        <input type="submit" class="button01" value="提交" name="">
                                        <input type="button" class="button01" value="释放" id='cancel'  name="">
                                    </div>
                               </div>
                       </form>

                </div>
  </div>
</div>

<div id="myModal" class="modal fade in" style="display: none;">
    <div class="modal-dialog modal-lg">
        <div class="modal-content">
            <div class="modal-header">
                <button data-dismiss="modal" class="close" type="button">×</button>
                <h4 class="modal-title">详情页面</h4>
            </div>
            <div class="modal-body" style='height:200px;'></div>
            <!-- <div class="modal-footer">
                <button class="btn btn-danger adopt" data-type='0' type="button">删除</button>
            </div> -->
        </div>
    </div>
</div>
</div>
</div>

<script type="text/javascript">
    $('.checkin').click(function(){
            obj = $(this), id = obj.data('id');
            var html = '';
            $.post('{:U("Apply/check_info")}', {id: id}, function(data){

                    html = '<p class="col-sm-6">审核人：' + data.admin_name + '</p>';
                    html += '<p class="col-sm-6">身份：' + data.type + '</p>';
                    if(data.status==0){
                      html += '<p class="col-sm-6">未通过类型：' + data.refuse_name + '</p>';
                      html += '<p class="col-sm-6">未通过原因：' + data.refuse_reason + '</p>';
                    }else{
                      html += '<p class="col-sm-6">通过意见：' + data.opinion + '</p>';
                      html += '<p class="col-sm-6">通过备注：' + data.note + '</p>';
                    }
                    $('.modal-body').html(html);
                    $('#myModal').show();
                   // $('#myModal').modal('show');
            });
        });

      $(".close").click(function(){
         $('#myModal').hide();
      });
   $('#cancel').click(function(){
      var user_id={$info.id|default=0};
      $.post('{:U("Index/cancel_status")}',{id:user_id},function(data){
        if(data.status==1){
           location.href='{:U("Check/admin")}';
        }else{
           alert(data.info);
           window.history.back(); 
        }
      });
    });
     $('#user_select').change(function(){
        var Cstatus=$("select[name='Cstatus']").val();
        if(Cstatus==0){
          $('#refuse').css('display','block');
        }else{
          $('#refuse').css('display','none');  
        }
      
    });   
             // 初始化地区户籍
    $("#household-registration").distpicker({
      province: '{$h_areaInfo.province}',
      city: '{$h_areaInfo.city}',
      district: '{$h_areaInfo.district}'
    });

    // 初始化地区现居住地
    $("#now-address").distpicker({
      province: '{$now_areaInfo.province}',
      city: '{$now_areaInfo.city}',
      district: '{$now_areaInfo.district}'
    });

    // 初始化地区单位地址
    $("#distpicker").distpicker({
      province: '{$c_areaInfo.province}',
      city: '{$c_areaInfo.city}',
      district: '{$c_areaInfo.district}'
    });

    // 初始化配偶户籍
    $("#spouse-home").distpicker({
      province: '{$s_h_areaInfo.province}',
      city: '{$s_h_areaInfo.city}',
      district: '{$s_h_areaInfo.district}'
    });

    // 初始化配偶现居住地
    $("#spouse-now").distpicker({
      province: '{$s_now_areaInfo.province}',
      city: '{$s_now_areaInfo.city}',
      district: '{$s_now_areaInfo.district}'
    });

    // 初始化配偶单位地址
    $("#spouse-company").distpicker({
      province: '{$s_c_areaInfo.province}',
      city: '{$s_c_areaInfo.city}',
      district: '{$s_c_areaInfo.district}'
    });

    // 初始化担保人户籍
    $("#assure-home").distpicker({
      province: '{$a_h_areaInfo.province}',
      city: '{$a_h_areaInfo.city}',
      district: '{$a_h_areaInfo.district}'
    });

    // 初始化担保人现居住地
    $("#assure-now").distpicker({
      province: '{$a_now_areaInfo.province}',
      city: '{$a_now_areaInfo.city}',
      district: '{$a_now_areaInfo.district}'
    });

    // 初始化担保人单位地址
    $("#assure-company").distpicker({
      province: '{$a_c_areaInfo.province}',
      city: '{$a_c_areaInfo.city}',
      district: '{$a_c_areaInfo.district}'
    });
    // 主贷人和紧急联系人切换
    $(function(){
        $('.info_top').find('li').click(function(elm){
            cureent_index = $(this).index();
            if(cureent_index == 0){
                $('.spouse').css("display","none");
                $('.assure').css("display","none");
                $('.urgent-contactor').css("display","none");
                $('.base-info').css("display","block");
            }else if(cureent_index == 1){
                $('.spouse').css("display","none");
                $('.assure').css("display","none");
                $('.urgent-contactor').css("display","block");
                $('.base-info').css("display","none");
            }else if(cureent_index == 2){
                $('.spouse').css("display","none");
                $('.assure').css("display","block");
                $('.urgent-contactor').css("display","none");
                $('.base-info').css("display","none");
            }else if(cureent_index == 3){
                $('.spouse').css("display","block");
                $('.assure').css("display","none");
                $('.urgent-contactor').css("display","none");
                $('.base-info').css("display","none");
            }
            $(this).addClass("active").siblings("").removeClass("active");
        });
    });

    //初始加载
        $(document).ready(function () {
            var iv2 = $("#viewer2").iviewer({
                src: 'img/test_image2.jpg'
                /*zoom_min: 185,
                 zoom_max: 2000,*/
            });
            $('.wrapper-main').hide().css('opacity','1');
        });

        $('.js_img').click(function(){
            $('.viewer img').attr('src', $(this).attr('src'));
            $('.wrapper-main').show();
        });

        var arr = [{$src}];
        $('.left,.right').click(function () {
            pguppgdn(this);
        });

        var pguppgdn= function (Dom) {
            var domimg = $('.viewer img').attr('src');
            var n = ($.inArray(domimg, arr));
            if (n >= 0 && n < arr.length) {
                if ($(Dom).hasClass('left')) {
                    $('.viewer img').attr('src', arr[n - 1]);
                }
                if ($(Dom).hasClass('right')) {
                    $('.viewer img').attr('src', arr[n + 1]);
                }
            }
        };
        $('.clear').click(function () {
            $('.wrapper-main').hide();
        });

        $(document).ready(function(){
            $("body").keydown(function(event){
                if(event.keyCode==37){
                    pguppgdn($('.left'));
                }
                if(event.keyCode==39){
                    pguppgdn($('.right'));
                }
            });
        });
</script>
</body>
</html>